import { defHttp } from '/@/utils/http/axios';
import { MenuListGetResultModel } from './model/systemModel';
enum Api {
  MenuList = '/services/app/RoleMenu/GetRoleMenuList',
  CreateRoleMenu = `/services/app/RoleMenu/CreateRoleMenu`,
  UpdateRoleMenu = `/services/app/RoleMenu/UpdateRoleMenu`,
}

export const getMenuList = (params?: any) =>
  defHttp.post<MenuListGetResultModel>({ url: Api.MenuList, data: params });

export const CreateRoleMenu = (params: any) =>
  defHttp.post({ url: Api.CreateRoleMenu, data: params });

export const UpdateRoleMenu = (params: any) =>
  defHttp.put({ url: Api.UpdateRoleMenu, data: params });

export const DeleteRoleMenu = (Id: any) =>
  defHttp.delete({ url: `/services/app/RoleMenu/DeleteRoleMenu?Id=${Id}` });
